<!DOCTYPE HTML>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>透明度</title>
  <style>
    img{
      opacity:0.4;
      filter:alpha(opacity=40); 
    }
    img:hover{
      opacity:1.0;
      filter:alpha(opacity=100); 
    }
  </style>
</head>

<body>
  <h1>透明度</h1>
  <img src="https://www.runoob.com/try/demo_source/img_tree.png" />
</body>

</html>